#ifndef PALLETE_H
#define PALLETE_H

#include "../serialization/iserializable.h"

#include <QtGui/QColor>

namespace core
{

class Palette : public ISerializable
{
public:
    Palette(const QColor& border, const QColor& foreground,
        const QColor& background, const QColor& whole,
        const QColor& selection, const QColor& transformation,
        const QColor& acceptsConnection, const QColor& deniesConnection);
    ~Palette();

    QColor borderColor() const;
    QColor foregroundColor() const;
    QColor backgroundColor() const;
    QColor wholeColor() const;
    QColor selectionColor() const;
    QColor transformationColor() const;
    QColor acceptsConnectionColor() const;
    QColor deniesConnectionColor() const;

    static Palette* defaultPalette();

    // ISerializable
    bool doActionForProperty(const QString& property,
        const QVariantList& value, const SerializationEngine& helper);
    void deserializationFinished(bool ok);
    QHash<QString, QVariantList> serializationData(
        const SerializationEngine& helper) const;

private:
    QColor m_borderColor;
    QColor m_foregroundColor;
    QColor m_backgroundColor;
    QColor m_wholeColor;
    QColor m_selectionColor;
    QColor m_transformationColor;
    QColor m_acceptsConnectionColor;
    QColor m_deniesConnectionColor;
};

} // namespace core

#endif
